import request from "@/utils/request";

// 查询商品分类列表
export function goodClassifyList(params) {
  return request({
    url: "/system/goodclassify/list",
    method: "get",
    params,
  });
}

// 获取商品分类详细信息
export function goodClassifyDetail(id) {
  return request({
    url: `/system/goodclassify/${id}`,
    method: "get",
  });
}

// 新增商品分类
export function goodclassifyAdd(data) {
  return request({
    url: "/system/goodclassify",
    method: "post",
    data,
  });
}

// 修改商品分类
export function goodclassifyEdit(data) {
  return request({
    url: "/system/goodclassify",
    method: "put",
    data,
  });
}

// 删除商品分类
export function goodclassifyDelete(id) {
  return request({
    url: `/system/goodclassify/${id}`,
    method: "delete",
  });
}
